<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>消息提示</title>
</head>
<body>
{% if messages %}
    <ul>
    {% for message in messages %}
        {# message.tag代表信息的类型 #}
    <li {% if message.tag %} class="{{ message.tag }}" {% endif %}>{{ message }}</li>
    {% endfor %}
    </ul>
    {% else %}
    <script>
    alert('暂无该信息!')
    </script>
{% endif %}
</body>
</html>